package com.oracle.controller;


import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MyController implements Controller {

    @Override
    public ModelAndView handleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
                String uname = httpServletRequest.getParameter("uname");
                String password = httpServletRequest.getParameter("password");

        System.out.println(uname);
        System.out.println(password);

        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("str",uname+"-"+password);
        modelAndView.setViewName("main");

        return modelAndView;
    }
}
